<!--
 * @Author: your name
 * @Date: 2022-01-05 15:07:24
 * @LastEditTime: 2022-01-05 15:42:01
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \20220105\完全居中.html
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
        }
        .banner{
            width: 1600px;
            height: 400px;
            background-color: darkorchid;
            /* 设置定位：相对定位 */
            position: relative;
            left: 50%;
            margin-left: -800px;
        }
        /* 优先级  标签选择器：1分 class选择器：10分 id选择器：100分 行内样式：1000分 !important:最高*/
        .banner div{
            height: 400px;
        }
        .banner .left{
            background-color: aquamarine;
            height: 300px;
        }
        .banner .right{
            background-color: brown;
            height: 200px;
        }
        #h500{
            height: 500px;
        }
        .h700{
            height: 700px !important; 
        }
    </style>
</head>
<body>
    <div class="banner">
        <div class="left">

        </div>
        <div class="right h700" id="h500" style="height: 600px;">

        </div>
    </div>
</body>
</html>
